Return to doc.sitecore.com

Valid for Sitecore 5.2, 5.1.1
  Add field definitions
Prev Next

In this section we add the field definitions that will be used in the methods for this class. 

1.  Add fields

1 // Fields
2 private readonly string ItemName = "Hello World";
3 private readonly ID MasterId = ID.Null;
4 // You can generate unique GUIDs in MS SQL Server via "select newid()"
5 // Alternatively, you can create new IDs using the ID class
6 private readonly ID TemplateId = new ID("{ABD9F13F-DFAC-4ED9-8C23-E0A9C5BB19C9}");
7 private readonly string Title = "Hello World!";
8 private readonly ID TitleId = new ID("{3F3FF111-1EE3-4181-A7E8-DFC489EAB2C4}");

Prev Next